class PrescriptionOrderListEntity {
  int code;
  Data data;
  String message;

  PrescriptionOrderListEntity({this.code, this.data, this.message});

  PrescriptionOrderListEntity.fromJson(dynamic json) {
    code = json["code"];
    data = json["data"] != null ? Data.fromJson(json["data"]) : null;
    message = json["message"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["code"] = code;
    if (data != null) {
      map["data"] = data.toJson();
    }
    map["message"] = message;
    return map;
  }
}

class Data {
  int totalRow;
  int pageIndex;
  int totalPage;
  List<Datas> datas;
  PageInfo pageInfo;
  int pageSize;

  Data(
      {this.totalRow,
      this.pageIndex,
      this.totalPage,
      this.datas,
      this.pageInfo,
      this.pageSize});

  Data.fromJson(dynamic json) {
    totalRow = json["totalRow"];
    pageIndex = json["pageIndex"];
    totalPage = json["totalPage"];
    if (json["datas"] != null) {
      datas = [];
      json["datas"].forEach((v) {
        datas.add(Datas.fromJson(v));
      });
    }
    pageInfo =
        json["pageInfo"] != null ? PageInfo.fromJson(json["pageInfo"]) : null;
    pageSize = json["pageSize"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["totalRow"] = totalRow;
    map["pageIndex"] = pageIndex;
    map["totalPage"] = totalPage;
    if (datas != null) {
      map["datas"] = datas.map((v) => v.toJson()).toList();
    }
    if (pageInfo != null) {
      map["pageInfo"] = pageInfo.toJson();
    }
    map["pageSize"] = pageSize;
    return map;
  }
}

class PageInfo {
  String date;
  int totalRow;
  int pageIndex;
  int totalPage;
  int pageSize;

  PageInfo(
      {this.date,
      this.totalRow,
      this.pageIndex,
      this.totalPage,
      this.pageSize});

  PageInfo.fromJson(dynamic json) {
    date = json["date"];
    totalRow = json["totalRow"];
    pageIndex = json["pageIndex"];
    totalPage = json["totalPage"];
    pageSize = json["pageSize"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["date"] = date;
    map["totalRow"] = totalRow;
    map["pageIndex"] = pageIndex;
    map["totalPage"] = totalPage;
    map["pageSize"] = pageSize;
    return map;
  }
}

class Datas {
  String faceImg;
  String profitTime;
  int patientSex;
  String payTime;
  int rpTypeID;
  String enjoin;
  int deliveryTypeID;
  int orgTypeID;
  String orderStatusName;
  String diseaseDiff;
  int orderStatusID;
  int payTypeID;
  int containsRp;
  String medicineForm;
  int deliveryStatusID;
  int patientAge;
  String personID;
  int orderPrice;
  int medicineFormID;
  String patientName;
  int orderSource;
  String refundTime;
  String keyID;
  int deliveryPrice;
  String rpID;
  int profitStatusID;
  String orgID;
  String payTypeName;
  String rpTypeName;
  String syndromeDiff;
  String personName;
  String deliveryStatusName;
  String deliveryTypeName;
  String doctorID;
  String createTime;
  String doctorOrgID;
  int goodsPrice;
  String profitStatusName;
  String primaryDiagnosis;

  Datas(
      {this.profitTime,
      this.patientSex,
      this.payTime,
      this.rpTypeID,
      this.enjoin,
      this.deliveryTypeID,
      this.orgTypeID,
      this.orderStatusName,
      this.diseaseDiff,
      this.orderStatusID,
      this.payTypeID,
      this.containsRp,
      this.medicineForm,
      this.deliveryStatusID,
      this.patientAge,
      this.personID,
      this.orderPrice,
      this.medicineFormID,
      this.patientName,
      this.orderSource,
      this.refundTime,
      this.keyID,
      this.deliveryPrice,
      this.rpID,
      this.profitStatusID,
      this.orgID,
      this.payTypeName,
      this.rpTypeName,
      this.syndromeDiff,
      this.personName,
      this.deliveryStatusName,
      this.deliveryTypeName,
      this.doctorID,
      this.createTime,
      this.doctorOrgID,
      this.goodsPrice,
      this.profitStatusName,
      this.primaryDiagnosis});

  Datas.fromJson(dynamic json) {
    profitTime = json["profitTime"];
    patientSex = json["patientSex"];
    payTime = json["payTime"];
    rpTypeID = json["rpTypeID"];
    enjoin = json["enjoin"];
    deliveryTypeID = json["deliveryTypeID"];
    orgTypeID = json["orgTypeID"];
    orderStatusName = json["orderStatusName"];
    diseaseDiff = json["diseaseDiff"];
    orderStatusID = json["orderStatusID"];
    payTypeID = json["payTypeID"];
    containsRp = json["containsRp"];
    medicineForm = json["medicineForm"];
    deliveryStatusID = json["deliveryStatusID"];
    patientAge = json["patientAge"];
    personID = json["personID"];
    orderPrice = json["orderPrice"];
    medicineFormID = json["medicineFormID"];
    patientName = json["patientName"];
    orderSource = json["orderSource"];
    refundTime = json["refundTime"];
    keyID = json["keyID"];
    deliveryPrice = json["deliveryPrice"];
    rpID = json["rpID"];
    profitStatusID = json["profitStatusID"];
    orgID = json["orgID"];
    payTypeName = json["payTypeName"];
    rpTypeName = json["rpTypeName"];
    syndromeDiff = json["syndromeDiff"];
    personName = json["personName"];
    deliveryStatusName = json["deliveryStatusName"];
    deliveryTypeName = json["deliveryTypeName"];
    doctorID = json["doctorID"];
    createTime = json["createTime"];
    doctorOrgID = json["doctorOrgID"];
    goodsPrice = json["goodsPrice"];
    profitStatusName = json["profitStatusName"];
    primaryDiagnosis = json["primaryDiagnosis"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map['faceImg'] = faceImg;
    map["profitTime"] = profitTime;
    map["patientSex"] = patientSex;
    map["payTime"] = payTime;
    map["rpTypeID"] = rpTypeID;
    map["enjoin"] = enjoin;
    map["deliveryTypeID"] = deliveryTypeID;
    map["orgTypeID"] = orgTypeID;
    map["orderStatusName"] = orderStatusName;
    map["diseaseDiff"] = diseaseDiff;
    map["orderStatusID"] = orderStatusID;
    map["payTypeID"] = payTypeID;
    map["containsRp"] = containsRp;
    map["medicineForm"] = medicineForm;
    map["deliveryStatusID"] = deliveryStatusID;
    map["patientAge"] = patientAge;
    map["personID"] = personID;
    map["orderPrice"] = orderPrice;
    map["medicineFormID"] = medicineFormID;
    map["patientName"] = patientName;
    map["orderSource"] = orderSource;
    map["refundTime"] = refundTime;
    map["keyID"] = keyID;
    map["deliveryPrice"] = deliveryPrice;
    map["rpID"] = rpID;
    map["profitStatusID"] = profitStatusID;
    map["orgID"] = orgID;
    map["payTypeName"] = payTypeName;
    map["rpTypeName"] = rpTypeName;
    map["syndromeDiff"] = syndromeDiff;
    map["personName"] = personName;
    map["deliveryStatusName"] = deliveryStatusName;
    map["deliveryTypeName"] = deliveryTypeName;
    map["doctorID"] = doctorID;
    map["createTime"] = createTime;
    map["doctorOrgID"] = doctorOrgID;
    map["goodsPrice"] = goodsPrice;
    map["profitStatusName"] = profitStatusName;
    map["primaryDiagnosis"] = primaryDiagnosis;
    return map;
  }
}
